Name: facedetect-cv
Version: 0.1
Release: alt1

Summary: Simple utility for a face detection
Group: Graphics
License: MIT
URL: https://hub.mos.ru/lubyagin/facedetect-cv/
Packager: Alexander Lubyagin <dfpl@altlinux.org>

Source: %name-%version.tar.gz

BuildRequires: libopencv-devel gcc-c++ gcc-c++-common
Requires: libopencv4.5
BuildArch: x86_64

%description
This is a simple and fast utility, that recognizes an front faces,
and output the count of its.

%prep
%setup -q

%define _optlevel 3

%build
make clean
%make_build %name CFLAGS="$RPM_OPT_FLAGS"

%install
install -p -m755 -D facedetect-cv $RPM_BUILD_ROOT%_bindir/facedetect-cv
install -p -m755 -D facemask-cv $RPM_BUILD_ROOT%_bindir/facemask-cv
install -p -m644 -D data/haarcascade_frontalface_alt2.xml $RPM_BUILD_ROOT%_datadir/data/facedetect-cv/haarcascade_frontalface_alt2.xml
install -p -m644 -D data/haarcascade_frontalface_alt_tree.xml $RPM_BUILD_ROOT%_datadir/data/facedetect-cv/haarcascade_frontalface_alt_tree.xml
install -p -m644 -D data/haarcascade_frontalface_alt.xml $RPM_BUILD_ROOT%_datadir/data/facedetect-cv/haarcascade_frontalface_alt.xml
install -p -m644 -D data/haarcascade_frontalface_default.xml $RPM_BUILD_ROOT%_datadir/data/facedetect-cv/haarcascade_frontalface_default.xml

%files
%_bindir/*
%_datadir/*

%changelog
* Fri Jan 26 2024 Alexander Lubyagin <dfpl@altlinux.org> 0.1-alt1
- facemask utility that draw black filled rectangle on top of face

* Fri Jan 26 2024 Alexander Lubyagin <dfpl@altlinux.org>
- First release
